package com.cy.pj.goods.server;

import com.cy.pj.goods.dao.GoodsDao;
import com.cy.pj.goods.pojo.Goods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {
    @Autowired
    GoodsDao goodsDao;

    @Override
    public List<Goods> findAllGoods() {
        return goodsDao.findAllGoods();
    }

    @Override
    public void deleteById(Integer id) {
        goodsDao.deleteById(id);
    }

    @Override
    public void insert(Goods goods) {
        goodsDao.insert(goods);
    }

    @Override
    public Goods selectById(Integer id) {
        return goodsDao.selectById(id);
    }

    @Override
    public void update(Goods goods) {
        goodsDao.update(goods);
    }
}
